<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Generator" content="ALORK 20150428.01" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
<?php echo $this->smarty_insert_scripts(array('files'=>'./../js/jquery.js,./../js/jquery.json-1.3.js,./../js/jquery.flexslider-min.js')); ?>
<title><?php echo $this->_var['page_title']; ?></title>
<link rel="stylesheet" href="./public/my_style.css" />
</head>
<body>
<?php echo $this->fetch('library/baidutongji.lbi'); ?>
<?php echo $this->fetch('library/user_head.lbi'); ?>
  <div id="pai_son">
            <!-- <a onclick="show(this);">搜索</a>
            <div id="seach" style="border:none;">
              <form name="searchForm" method="get" action="search.php" id="seach_from">
              <input name="keywords" type="seach" class="text" style="border-left:solid 1px #d4d5d8;border-right:solid 1px #d4d5d8;" />
              <canvas id="seach_img"  width="50" height="35" onclick="$('#seach_from').submit();"   class="seach" style="cursor:pointer;"></canvas>
              
              </form>
            </div>  -->
            
            <div id="sort">
            <a href="category.php?category=145" class="before" id="before"><div>全部</div></a>
            <script type="text/javascript">
                if(window.location.search == "?category=145"){
                  document.getElementById("before").className = "after";
                }
            </script>
            <a href="<?php echo $this->_var['script_name']; ?>.php?category=<?php echo $this->_var['category']; ?>&page=<?php echo $this->_var['pager']['page']; ?>&sort=click_count&order=<?php if ($this->_var['pager']['sort'] == 'click_count' && $this->_var['pager']['order'] == 'DESC'): ?>ASC<?php else: ?>DESC<?php endif; ?>"<?php if ($this->_var['pager']['sort'] == 'click_count'): ?> class="now"<?php endif; ?>><div>人气</div> <?php if ($this->_var['pager']['sort'] == 'click_count' && $this->_var['pager']['order'] == 'DESC'): ?><i class="down"></i><?php endif; ?><?php if ($this->_var['pager']['sort'] == 'click_count' && $this->_var['pager']['order'] == 'ASC'): ?><i class="up"></i><?php endif; ?>  <?php if ($this->_var['pager']['sort'] != 'click_count'): ?> <i class="default"></i><?php endif; ?>
            </a>

            <a href="<?php echo $this->_var['script_name']; ?>.php?category=<?php echo $this->_var['category']; ?>&page=<?php echo $this->_var['pager']['page']; ?>&sort=buy_sum&order=<?php if ($this->_var['pager']['sort'] == 'buy_sum' && $this->_var['pager']['order'] == 'DESC'): ?>ASC<?php else: ?>DESC<?php endif; ?>"<?php if ($this->_var['pager']['sort'] == 'buy_sum'): ?> class="now"<?php endif; ?>><div>销量</div><?php if ($this->_var['pager']['sort'] == 'buy_sum' && $this->_var['pager']['order'] == 'DESC'): ?><i class="down"></i><?php endif; ?><?php if ($this->_var['pager']['sort'] == 'buy_sum' && $this->_var['pager']['order'] == 'ASC'): ?><i class="up"></i><?php endif; ?>
               <?php if ($this->_var['pager']['sort'] != 'buy_sum'): ?> <i class="default"></i><?php endif; ?>
            </a>

            <a href="<?php echo $this->_var['script_name']; ?>.php?category=<?php echo $this->_var['category']; ?>page=<?php echo $this->_var['pager']['page']; ?>&sort=shop_price&order=<?php if ($this->_var['pager']['sort'] == 'shop_price' && $this->_var['pager']['order'] == 'ASC'): ?>DESC<?php else: ?>ASC<?php endif; ?>"<?php if ($this->_var['pager']['sort'] == 'shop_price'): ?> class="now"<?php endif; ?>><div>价格<?php if ($this->_var['pager']['sort'] == 'shop_price' && $this->_var['pager']['order'] == 'DESC'): ?><i class="down"></i><?php endif; ?><?php if ($this->_var['pager']['sort'] == 'shop_price' && $this->_var['pager']['order'] == 'ASC'): ?><i class="up"></i><?php endif; ?><?php if ($this->_var['pager']['sort'] != 'shop_price'): ?> <i class="default"></i><?php endif; ?></div></a>
          </div>



  </div>

 <div id="category">
<?php $_from = $this->_var['goods_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods');if (count($_from)):
    foreach ($_from AS $this->_var['goods']):
?>
  <div class="msg_boxs">
    <div class="left">
  <div class="msg">

    <!-- <div class="like" onclick="ajax_like(<?php echo $this->_var['goods']['goods_id']; ?>,this)">
      <?php echo $this->_var['goods']['click_count']; ?>
    </div> -->
    <?php if ($this->_var['goods']['promote_price']): ?>
    <div class="limit_icon"></div>
    <?php endif; ?>
    <?php if ($this->_var['goods']['is_new'] == 1): ?>
    <div class="by_your_pricing"></div>
    <?php endif; ?> 
  <a href="<?php echo $this->_var['goods']['url']; ?>" class="img">
    <img src="./../<?php echo $this->_var['goods']['goods_thumb']; ?>" alt="<?php echo $this->_var['goods']['name']; ?>" />
  </a>
  <a href="<?php echo $this->_var['goods']['url']; ?>">
    <div class="name"><?php echo $this->_var['goods']['name']; ?></div>
    <!-- <span style="color:#ab0409; font-size:12px; display:block; padding:0px 10%;">买100送50,买300送150,买500送300</span> -->
    <div class="price" style="font-size: 12px;"><?php if ($this->_var['goods']['promote_price']): ?><?php echo $this->_var['goods']['promote_price']; ?><?php else: ?><?php echo $this->_var['goods']['shop_price']; ?><?php endif; ?><span class="market_price"><?php echo $this->_var['goods']['market_price']; ?></span></div>
  </a>
  </div>
 </div>
</div>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
</div>
<div class="cate_bottom">
        <?php $_from = $this->_var['ad_1']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'ad');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['ad']):
?>
            <a href="<?php echo $this->_var['ad']['ad_link']; ?>"><img src="../data/afficheimg/<?php echo $this->_var['ad']['ad_code']; ?>" alt="" /></a>
        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
</div>
<?php echo $this->fetch('library/pager_list.lbi'); ?>
<?php echo $this->fetch('library/page_foot2.lbi'); ?>

</body>
  <script type="text/javascript">
    function ajax_like(id,obj){
      htmlobj=$.ajax({url:"goods.php?act=click&id="+id, async:false, dataType:"text", success: function(text){
            $(obj).text(text);
        }});
    }
    // 页面跳转JS
    function JUMP(address){
     self.location=address;
 
    }


  </script>
<script type="text/javascript">
 $(document).ready(function(){
  var width= $("#category").width();
  width=width-232;
  $(window).scroll(function(){
    var left= $(window).width();
     left=(left-320)/2;
   if($(window).scrollTop()>=100){
    $("#pai_son").css("position","fixed").css("top","0px").addClass("moves");
    
    $("#pai_son").width("100%");
   }
  if($(window).scrollTop()<100){
$("#pai_son").css("position","relative").css("top","0px").removeClass("moves");
$("#pai_son").css("left","0px");
  }
  });

 });

 function show(now){
    var mode=$("#seach").css('display');
    if( mode=="none"){
      $("#seach").css('width','75%');
      var width=$("#seach").width();
       $(".text").width(width-60);
      $("#seach").show();
      $("#seach").find(".text")[0].focus(); 
      $("#sort").hide();
    }
    else{
      $("#seach").hide();
      $("#sort").show();
    }
  
 }
</script>


</html>